package be.jabapage.snooker.service.overwriter.impl;

import java.io.Serializable;

import org.apache.commons.lang.Validate;

import be.jabapage.snooker.jdo.administration.Region;
import be.jabapage.snooker.service.overwriter.api.IRegionOverwriter;

/**
 * {@link IRegionOverwriter} that overwrites only the regionId.
 * @author axesq
 *
 */
public class SimpleRegionOverwriter implements IRegionOverwriter, Serializable {

	private static final long serialVersionUID = 9205356652000659607L;

	/**
	 * {@inheritDoc}
	 */
	public void overwrite(final Region source, final Region target) {
		Validate.notNull(source);
		Validate.notNull(target);
		target.setId(source.getId());
	}

}
